package classdemo;

class data{
    public int year;
    public int month;
    public int day;

    public void setData(int year,int month,int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }
    public void printdata()
    {
        System.out.println(year +" "+month +" "+ day);
    }
}
public class demo2 {
    public static void main(String[] args) {
        data d1 = new data();
        data d2 = new data();
        data d3 = new data();

        d1.setData(2024,4,22);
        d2.setData(2023,4,22);
        d3.setData(2022,4,22);

        d1.printdata();
        d2.printdata();
        d3.printdata();

    }
}
